package cn.lysj.framework.foodv2.domain;

import cn.lysj.framework.base.BaseEntity;
import cn.lysj.framework.common.RelationType;
import cn.lysj.framework.common.annotation.Relation;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.models.auth.In;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Entity;
import javax.persistence.Transient;
import java.util.List;

/**
 * @author drj
 * @description 一级规格
 * @create 2018-11-09 11:29:51
 **/
@Data
@Entity
@EqualsAndHashCode(callSuper = true)
public class StandardLevOne extends BaseEntity {

    private String foodId; //菜品id
    private String flag;//是否支持多选标识:1-多选,2-单选
    @Transient
    @Relation(idProperty = "foodId", serviceName = "foodService", relationType = RelationType.ONE)
    private Food food;

    @Transient
    @Relation(serviceName = "standardLevTwoService", relationType = RelationType.MANY)
    private List<StandardLevTwo> standardLevTwos;

}